<?if(!defined("B_PROLOG_INCLUDED")||B_PROLOG_INCLUDED!==true)die();?>
<div class="mfeedback">
<?if(!empty($arResult["ERROR_MESSAGE"]))
{
	foreach($arResult["ERROR_MESSAGE"] as $v)
		ShowError($v);
}
if(strlen($arResult["OK_MESSAGE"]) > 0)
{
	?><div class="mf-ok-text"><?=$arResult["OK_MESSAGE"]?></div><?
}
?>

<form action="" method="POST">
	<div class="no-display">
		<?=bitrix_sessid_post()?>
	</div>
	<ul class="form">
	<?foreach($arParams["FORM_FIELDS"] as $form_field=>$arField):?>
		<li>
			<label for="<?=$form_field?>">
				<span><?=$arField["TITLE"]?></span>
				<?
				switch ($arField["TYPE"])
				{
					case "STRING" :
					case "EMAIL"  :?>
						<input type="text" name="<?=$form_field?>" id="<?=$form_field?>" value="<?=$arResult[$form_field]?>" class="<?=$arField["CLASS"]?>" />
						<?break;
					case "TEXT"	:?>
						<textarea name="<?=$form_field?>" id="<?=$form_field?>" class="<?=$arField["CLASS"]?>"><?=$arResult[$form_field]?></textarea>
						<?break;
				};
				?>
			</label>
		</li>
	<?endforeach;?>
	
	<?if($arParams["USE_CAPTCHA"] == "Y"):?>
		<li class="captcha">
			<label for="code">
				<div class="no-display">
					<input type="hidden" name="captcha_sid" value="<?=$arResult["capCode"]?>">
				</div>
				<img src="/bitrix/tools/captcha.php?captcha_sid=<?=$arResult["capCode"]?>" width="180" height="40" alt="CAPTCHA">
			</label>
		</li>
		<li>
			<label for="code">
				<span><?=GetMessage("MFT_CAPTCHA_CODE")?>:</span>
				<input id="code" type="text" class="text-validation" name="captcha_word" value="" />
			</label>
		</li>
	<?endif;?>
		
		<li class="auth-links">
			<input type="submit" name="submit" value="<?=GetMessage("MFT_SUBMIT")?>">
		</li>
	</ul>
</form>
</div>